/*! \file eval_expr.h
 *  \brief Expression evaluation header file
 *  \author Lluis Garrido
 *
 *  This file contains the header for eval_expr.c 
 *
 */


#ifndef EVAL_EXPR_H
#define EVAL_EXPR_H

/*! \def MAX_SIZE_VARIABLE
 *  \brief Maximum size in characters for a variable name
 */
#define MAX_SIZE_VARIABLE  8
/*! \def MAX_SIZE_FUNCTION
 *  \brief Maximum size in characters for a function name
 */
#define MAX_SIZE_FUNCTION  MAX_SIZE_VARIABLE
/*! \def MAX_RPN_LENGTH
 *  \brief Maximum size for the stack used to store an expression in post-fix notation. See main.c.
 */
#define MAX_RPN_LENGTH     100
/*! \def MAX_STACK_LENGTH
 *  \brief Maximum size for the stack used to store operators. Used internally by ::eval_expr_shunting_yard.
 */
#define MAX_STACK_LENGTH   32

#include "utils.h"
#include "rpn_stack.h"
#include "variables.h"
#include "functions.h"

/*! \struct eval_expr_param 
 *  \brief Parameters associated to an expression evaluation.
 *
 *  Functions ::eval_expr_shunting_yard and ::eval_expr_evaluation
 *  require as parameter a pointer to a structure of this type. Inside
 *  this structure two structures are stored:
 *  - An array of type ::list_functions that stores available functions.
 *  - An array of type ::list_variables that stores the variables with their
 *    associated values.
 *
 */

struct eval_expr_param
{
  struct list_variables *lva; /*!< Array of variables with their associated values */ 
  struct list_functions *lfu;  /*!< Array of tuples of function names with their associated number of arguments and function pointer */
};

#include "headers.h"

#endif
